window.onload =function() {
        var tabList = document.getElementById("tab-list");
        var aLis = tabList.getElementsByTagName("li");
        var tDiv = document.getElementById("tDiv");
        var contents = tDiv.getElementsByTagName("div");

        for(var i = 0; i < aLis.length; i++) {
            aLis[i].index = i;
            aLis[i].onclick = function() {
                for(var j = 0; j < aLis.length; j++) {
                    aLis[j].className = '';
                }
                this.className = "tab-active";

                for(var j = 0; j < contents.length; j++) {
                    contents[j].className = "tab-content tab-content-hide";
                }
                contents[this.index].className = "tab-content tab-content-show";
            };
        }
};
var login_in = document.getElementById("login_in");
var bg = document.getElementById("bg");
var pop = document.getElementById("pop");
var close = document.getElementById("close");
var username = document.getElementById("username");
var password = document.getElementById("password");
var test = document.getElementById("test");
var name = document.getElementById("name");
var key = document.getElementById("key");
var key2 = document.getElementById("key2");
var email = document.getElementById("email");
var btn = document.getElementById("btn");
var btnlogin = document.getElementById("btnlogin");
login_in.addEventListener("click",function () {
    bg.style.display="block";
    pop.style.display="block";
});
close.addEventListener("click",function () {
    bg.style.display="none";
    pop.style.display="none";
});